package com.piece.core.message.config;

import com.piece.core.log.client.LogFactory;
import com.piece.core.message.client.SmsClientFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;

public class MessageAutoConfiguration {

    @Value("${spring.application.name:#{null}}")
    private String applicationName;

    @Bean
    public SmsClientFactory smsClientFactory(LogFactory auditLogFactory) {
        return new SmsClientFactory(applicationName, auditLogFactory);
    }
}